home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
prog_bas
/
pbc32.zip
/
PBC$BAS.ZIP
/
STRSQU3.BAS
< prev
next >
Wrap
BASIC Source File
|
1996-04-10
|
2KB
|
50 lines
' +----------------------------------------------------------------------+
' | |
' | PBClone (C) Copyright 1996 Charon Software, All Rights Reserved |
' | |
' +----------------------------------------------------------------------+
SUB StrSqu3 (St$, Result$)
s$ = St$
x$ = ". ththeinghe ed to anng nd a andto of waof as "
x$ = x$ + " inwasat beer re e ther ha hein ered t it...hatt te a"
x$ = x$ + "tha I it ly is ents ae wall co, at wen Iut foraten t"
x$ = x$ + "ion wiyouon e steran fo yome t a we ma hior es nover"
x$ = x$ + "hisad s td ath thiThe wh soomeithourwittio retedst n a"
x$ = x$ + "e oe h asve s, stll hade me, on li don'tevese ecte c"
x$ = x$ + "note b Thoute pld ati.. , t't mot ite oulot d b pr leuldt o"
code% = 128
DO
a$ = LEFT$(x$, 3)
DO
i% = INSTR(s$, a$)
IF i% THEN s$ = LEFT$(s$, i% - 1) + CHR$(code%) + MID$(s$, i% + 3)
LOOP WHILE i%
x$ = MID$(x$, 4)
code% = code% + 1
LOOP WHILE LEN(x$)
IF LEN(Result$) THEN MID$(Result$, 1) = s$
END SUB
SUB StrSquLen3 (St$, ResultLen)
s$ = St$
x$ = ". ththeinghe ed to anng nd a andto of waof as "
x$ = x$ + " inwasat beer re e ther ha hein ered t it...hatt te a"
x$ = x$ + "tha I it ly is ents ae wall co, at wen Iut foraten t"
x$ = x$ + "ion wiyouon e steran fo yome t a we ma hior es nover"
x$ = x$ + "hisad s td ath thiThe wh soomeithourwittio retedst n a"
x$ = x$ + "e oe h asve s, stll hade me, on li don'tevese ecte c"
x$ = x$ + "note b Thoute pld ati.. , t't mot ite oulot d b pr leuldt o"
code% = 128
DO
a$ = LEFT$(x$, 3)
DO
i% = INSTR(s$, a$)
IF i% THEN s$ = LEFT$(s$, i% - 1) + CHR$(code%) + MID$(s$, i% + 3)
LOOP WHILE i%
x$ = MID$(x$, 4)
code% = code% + 1
LOOP WHILE LEN(x$)
ResultLen% = LEN(s$)
END SUB